
#ifndef __DRV_USART_H_
#define __DRV_USART_H_

#include <stdint.h>
#include <stdbool.h>

#include "drv_usart_definitions.h"

uint32_t drv_usart_init(usart_cfg_t *init);

SYS_MODULE_OBJ DRV_USART_Initialize(const SYS_MODULE_INDEX drvIndex,
                                    const SYS_MODULE_INIT *const init);

DRV_HANDLE DRV_USART_Open(const SYS_MODULE_INDEX drvIndex);

size_t DRV_USART_Read_Byte(const DRV_HANDLE hClient, uint8_t * data);

size_t DRV_USART_Read(const DRV_HANDLE hClient, void * destination, size_t nBytes);

void DRV_USART_Write_Byte(DRV_HANDLE hClient, char ch);

size_t DRV_USART_Write(DRV_HANDLE hClient, const char *data, uint16_t len);
#endif

